package com.aspose.cells;

class zed extends zbz {
   zed() {
      this.c(433);
   }

   void a(zxt var1) {
      FormatCondition var2 = var1.a;
      int var3 = var1.d == null ? 12 : var1.d.d() + 6;
      boolean var4 = false;
      int var5 = 0;
      int var6 = var2.c;
      int var7 = var2.b;
      Object var8 = null;
      byte[] var12;
      if (var1.f != null) {
         var6 = 1;
         var12 = var1.f;
      } else {
         var2.f();
         var12 = var2.a();
      }

      if (var6 == 1) {
         var7 = 6;
      }

      var3 += var12.length - 2;
      int var11 = var12.length - 2;
      if (var6 == 0 && var2.c() != null && (var7 == 0 || var7 == 7)) {
         var3 += var2.c().length - 2;
         var5 = var2.c().length - 2;
      }

      this.a((short)var3);
      this.c = new byte[this.d()];
      byte var9 = 0;
      switch(var6) {
      case 0:
         this.c[var9] = 1;
         break;
      case 1:
         this.c[var9] = 2;
      }

      this.c[var9 + 1] = a(var7);
      int var13 = var9 + 2;
      System.arraycopy(com.aspose.cells.b.a.zc.a((short)var11), 0, this.c, var13, 2);
      System.arraycopy(com.aspose.cells.b.a.zc.a((short)var5), 0, this.c, var13 + 2, 2);
      var13 += 4;
      if (var1.d != null) {
         System.arraycopy(var1.d.e(), 0, this.c, var13, var1.d.d());
         var13 += var1.d.d();
      } else {
         var13 += 6;
      }

      System.arraycopy(var12, 2, this.c, var13, var12.length - 2);
      var13 += var12.length - 2;
      if (var7 == 0 || var7 == 7) {
         byte[] var10 = var2.c();
         System.arraycopy(var10, 2, this.c, var13, var10.length - 2);
         int var10000 = var13 + (var10.length - 2);
      }

   }

   static byte a(int var0) {
      switch(var0) {
      case 0:
         return 1;
      case 1:
         return 3;
      case 2:
         return 5;
      case 3:
         return 7;
      case 4:
         return 6;
      case 5:
         return 8;
      case 6:
      default:
         return 0;
      case 7:
         return 2;
      case 8:
         return 4;
      }
   }
}
